<!DOCTYPE html>
<html>

<head>
	<title id="titleId">Asynchronous module tests</title>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen" />
	<script type="text/javascript" src="qunit/qunit.js"></script>
    <script type="text/javascript">
        var require = {
            paths: {
                'jquery': '../../main/java/org/apache/wicket/resource/jquery/jquery-1.11.1', // no .js extension
                'wicket-event': '../../main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery',
                'Wicket': '../../main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery',
                'WicketDebugWindow': '../../main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery-debug'
            },
            shim: {
                'wicket-event': {
                    deps: ['jquery']
                },
                'Wicket': {
                    deps: ['wicket-event'],
                    exports: 'Wicket'
                },
                'WicketDebugWindow': {
                    deps: ['Wicket'],
                    exports: 'WicketDebugWindow'
                }
            }
        };
    </script>
    <script src="amd/require.js" type="text/javascript"></script>

    <!-- the module under test -->
    <script>
        var oldAutoStart = QUnit.config.autostart;
        // do not start the tests before they are loaded via AMD
        QUnit.config.autostart = false;

        require(["amd"], function (amdModule) {
                    QUnit.start();

                    amdModule.runTests();

                    QUnit.config.autostart = oldAutoStart;
            }
        );
    </script>
</head>

<body>
	<h1 id="qunit-header">Wicket AMD tests</h1>

	<h2 id="qunit-banner"></h2>

	<div id="qunit-testrunner-toolbar"></div>

	<h2 id="qunit-userAgent"></h2>

	<ol id="qunit-tests"></ol>

	<div id="qunit-fixture">

        <div id="amdElement"></div>

	</div>
</body>
</html>
